home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1996 / MacHack 1996.toast / Presentations / Presentations ’93 / Voice Toolkit / Voice Radio Button < prev    next >
Text File  |  1993-04-24  |  1KB  |  47 lines

  1.  
  2. (in-package "VOICE-TOOLKIT")
  3.  
  4. (export '(voice-radio-button initialize-instance))
  5.  
  6. (defclass voice-radio-button (radio-button-dialog-item)
  7.   ((careful :accessor careful
  8.             :initarg :careful
  9.             :initform t)
  10.    (exclusive :accessor exclusive
  11.               :initarg :exclusive
  12.               :initform t)
  13.    (text-color :accessor text-color)
  14.    (text-font :accessor text-font)))
  15.  
  16. (defmethod text ((self voice-radio-button))
  17.   (format nil "radio button ~a" 
  18.           (dialog-item-text self)))
  19.  
  20. (defmethod select ((self voice-radio-button))
  21.   (dialog-item-action self)
  22.   (radio-button-push self))
  23.  
  24. (defmethod mark ((self voice-radio-button))
  25.   (if (numberp *mark-method*)
  26.     (progn
  27.       (setf (text-color self) (part-color self :text))
  28.       (set-part-color self :text *mark-method*))
  29.     (progn
  30.       (setf (text-font self) (view-font self))
  31.       (set-view-font self (list (first (view-font self)) *mark-method*)))))
  32.  
  33. (defmethod unmark ((self voice-radio-button))
  34.   (if (numberp *mark-method*)
  35.     (set-part-color self :text (text-color self))
  36.     (set-view-font self (text-font self))))
  37.  
  38. (defmethod initialize-instance ((self voice-radio-button) &rest args)
  39.   (apply #'call-next-method (cons self (make-voice-shell args))))
  40.  
  41.  
  42. (defmethod identify ((self voice-radio-button))
  43.   (file-voice-item self))
  44.  
  45.  
  46.  
  47.